package com.ipDev.moyvSys;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ipDev.moyvSys.domain.po.Problem;
import com.ipDev.moyvSys.service.IProblemService;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
@Slf4j
public class pageTest4Problem {
    @Autowired
    private IProblemService problemService;

    @Test
    void  test1(){
        Page<Problem> page =problemService.lambdaQuery().like(Problem::getDescription, "This")
                .eq(Problem::getType,2 )
                .eq(Problem::getStatus, 1)
                .eq(Problem::getSectionId, 1)
                .page(new Page<>(1,10));
        List<Problem> records =
                page.getRecords();
      log.info("查询到的记录:{}",records);
    }
}
